Home > biomechZoo > Toolbox > Biomech Ops > fft_line.m

fft_line

PURPOSE ^

[mean_freq,max_freq,cut]= FFT_LINE(r,fsamp,thresh,graph) performs calculation of

SYNOPSIS ^

function [mean_freq,max_freq,cut]= fft_line(r,fsamp,thresh,graph)

DESCRIPTION ^

 [mean_freq,max_freq,cut]= FFT_LINE(r,fsamp,thresh,graph) performs calculation of
 single-sides amplitude spectrum and estimates cutoff frequency for filtering

 ARGUMENTS
  r          ...   Column vector data (n x 1)
  fsamp      ...   sampling rate of signal
  thresh     ...   threshold value to choose cutoff frequency. Default 10
  graph      ...   Generate plot of data (Boolean). Default true

 RETURNS
  mean_freq  ...   Weighted mean frequency of signal
  max_freq   ...   Frequency with maximum amplitude
  cut        ...   Estimated cutof frequency

 EXAMPLE

 here is a signal sampled at 1000Hz with a frequency of 10Hz. The
 fourier transform clearly shows a spike at 10Hz
 t = (0:0.001:1);   
 x = sin(20*pi*t);  
 fft_line(x,1000)

 See also fft, bmech_filter, filter_data, filter_line

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 10-Mar-2024 22:39:06 by m2html © 2005